package com.example.qxfw.nyqx.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.example.qxfw.common.entity.qx.MgfxYz;
import com.example.qxfw.nyqx.mapper.MgfxYzMapper;
import com.example.qxfw.nyqx.service.MgfxYzService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MgfxYzServiceImpl implements MgfxYzService {

    @Autowired
    private MgfxYzMapper mgfxYzMapper;

    @Override
    public List<MgfxYz> getList() {
        return mgfxYzMapper.selectList(null);
    }

    @Override
    public Integer update(MgfxYz mgfxYz) {
        return mgfxYzMapper.update(mgfxYz, Wrappers.<MgfxYz>lambdaUpdate().eq(MgfxYz::getFactorindex,mgfxYz.getFactorindex()));
    }
}
